Turns out meson has a build-in pattern of what we are doing, namely:
Set a subproject option to a parent project option of the same name.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1072
if get_option('extensions_tool')
extension_tool = subproject('extensions-tool',
default_options: [
- 'man=@0@'.format(get_option('man')),
'package_name=@0@'.format(meson.project_name()),
]
)
option('man',
type: 'boolean',
value: true,
- description: 'Generate man pages'
+ description: 'Generate man pages',
+ yield: true,
)
option('package_name',